<script lang="ts" setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goToChild1 = () => {
    router.push('/redirect/1')
}

const goToChild2 = () => {
    //   router.push('/child2')
}

const goToLogin = () => {
    router.push('/login')
}

const goToHelloWord = () => {
    router.push('/dashboard')
}
</script>

<template>
    <div>
        <el-button @click="goToChild1">点我去Child1</el-button>
        <el-button @click="goToChild2">点我去Child2</el-button>
        <el-button @click="goToLogin">点我去login</el-button>
        <el-button @click="goToHelloWord">点我去helloWord</el-button>
    </div>
    <div>这是子盒子</div>
    <router-view></router-view>
</template>

<style lang="sass"></style>